<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<meta http-equiv="Expires" CONTENT="-1"/>
<meta http-equiv="Cache-Control" CONTENT="no-cache"/>
<meta http-equiv="Pragma" CONTENT="no-cache"/>
<link rel="stylesheet" href="{:C('VSHOP_CSS')}person.css"/>

<script src="{:C('VSHOP_JS')}jquery-1.9.1.min.js"></script>
<script src="{:C('VSHOP_JS')}public.js"></script>
</head>
<body>
<header>
  <div class="head"><a href="#" class="head-return"></a>
    <h2 class="head-title">收货地址</h2>
  </div>
</header>
<div class="cart-pro-box">
<foreach name="dress" item="dre">
  <ul >
    <li class="title"><span class="tit" style="margin-left:0px;">{$dre.consignee}</span><span class="phone-num"><strong>{$dre.phone}</strong></span></li>
    <div class="blank10"></div>
    <li class="info-bg" onclick="javascript:window.location.href='#'" style="padding-left:10px;">
      <p>{$dre.shengid}{$dre.shiid}{$dre.countyid}{$dre.address}</p>
     
    <div class="blank10"></div>
  </ul>
  <div class="blank10"></div>
  <main><a href="{:U('Address/editdress',array('id'=>$dre['id']))}" class="btn-small-red right ml-20">编辑</a><a href="javascript:void(0);" class="btn-small-gray right"  id="del" value="{$dre.id}">删除</a>
  </main>
  <div class="blank10"></div>
<div class="blank10-f5"></div>
<div class="blank10"></div>

</foreach>

</div>
<div class="blank10"></div>
<a href="{:U('Address/address')}" class="btn-red" style="margin:10px; width:auto;">添加新地址</a>
<script type="text/javascript">
  /////删除地址
 $("#del").click(function()
  {
   var res=confirm("确定删除该地址吗");
   if(res==false)
   {
    return false;
   }
   var $id=$("#del").attr("value");
   $.ajax({
       type:'GET',
       url:"{:U('Address/deldress')}",
       data:{id:$id},
      dataType:'json',
      function(data)
      {
         if(data.status==200)
         {
           alert(data.info);

         }
      }
   })
 })
  
</script>

</body>
</html>
